package com.vcc.core.util;

import org.apache.commons.codec.binary.Base64;

import java.nio.charset.StandardCharsets;

public class Base64Util {

    public static String encodeToString(String content){
        return new Base64().encodeToString(content.getBytes(StandardCharsets.UTF_8));
    }

    public static String encodeToString(byte[] content){
        return new Base64().encodeToString(content);
    }

    public static byte[] decodeToByteArray(String content){
        return new Base64().decode(content);
    }
}
